package com.xinyan.controller;

import com.xinyan.pojo.SprayAdmin;
import com.xinyan.service.ISprayAdminService;
import com.xinyan.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 管理员表 前端控制器
 * </p>
 *
 * @author xzlf
 * @since 2024-03-26 16:37:02
 */
@RestController
@RequestMapping("/admin")
public class SprayAdminController {

    @Autowired
    private ISprayAdminService sprayAdminService;

    @PostMapping("/login")
    public R<SprayAdmin> loginAdmin(@RequestBody SprayAdmin sprayAdmin){
        SprayAdmin admin = sprayAdminService.adminLongin(sprayAdmin);
        return R.ok(admin);
    }
}
